home *** CD-ROM | disk | FTP | other *** search
- Path: keats.ugrad.cs.ubc.ca!not-for-mail
- From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku)
- Newsgroups: comp.lang.c
- Subject: Re: Pointer to Functions and Calls thereof??
- Date: 19 Apr 1996 10:55:22 -0700
- Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
- Message-ID: <4l8k2aINNg6f@keats.ugrad.cs.ubc.ca>
- References: <Dq01Ft.Dqn@latcs1.lat.oz.au> <4l2tlmINN822@keats.ugrad.cs.ubc.ca> <4l5p15$sl0@news1.intercall.com>
- NNTP-Posting-Host: keats.ugrad.cs.ubc.ca
-
- In article <4l5p15$sl0@news1.intercall.com>,
- Steven Ovits <engevar@intercall.com> wrote:
- >c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku) wrote:
- >
- >> In article <Dq01Ft.Dqn@latcs1.lat.oz.au>,
- >>> { void *a[1];
- >[snip]
- >> Secondly, when you declare an array TYPE a[1], you may only access elements
- >> a[0] and a[1]. Accessing element a[2] is not allowed. The C Standard calls it
- >> undefined behavior.
- >> By the way, if you want an array of two functions, you can declare this:
- >> void (* funarray[3])(void);
- >
- >The definition TYPE a[1] has only 1 object of type TYPE named a[0].
- >Similarly, void (*funarray[3])(void) is an array of 3 function
- >pointers.
-
- Heh, I really messed that one up, didn't I? I got a bunch of gleeful e-mails
- over it! :)
-